from django.conf.urls.defaults import patterns, url, include, handler500, handler404
from django.views.generic.simple import redirect_to

from amscms.private_messages.views import *

urlpatterns = patterns('amscms.private_messages.views',
   url(r'^$', redirect_to, {'url': 'inbox/'}, ),
   url(r'^inbox/$', inbox,  name='messages_inbox'),
   url(r'^outbox/$', outbox, name='messages_outbox'),
   url(r'^trash/$', trash, name='messages_trash'),
   url(r'^compose/$', compose, name='messages_compose'),
   url(r'^compose/(?P<recipient>[\w.@+-]+)/$', compose, name='messages_compose_to'),
   url(r'^reply/(?P<message_id>[\d]+)/$', reply, name='messages_reply'),
   url(r'^view/(?P<message_id>[\d]+)/$', view, name="messages_detail"),
   url(r'^delete/(?P<message_id>[\d]+)/$', delete, name="messages_delete"),
   url(r'^undelete/(?P<message_id>[\d]+)/$', undelete, name="messages_undelete"),
)